<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="css/base.css?v=20140102" rel="stylesheet" type="text/css" />
<title></title>
</head>

<body>
<div class="viewport" id="main_content"/>

<script type="text/javascript" src="js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="js/handlebars-v1.2.0.js"></script>
 
<script id="showtype_1" type="text/x-handlebars-template">

  <table class="tab">
  	{{#each GoodsItemsList}}
     <tr>
    	<td  align="right" nowrap="nowrap" width="40%">
        	<b>部门代码:</b>
        </td>
        <td align="left" width="60%">
        	{{DeptId}}
        </td>
    	<td  align="right" nowrap="nowrap" width="40%">
        	<b>部门名称:</b>
        </td>
        <td align="left" width="60%">
        	{{DeptName}}
        </td>
    </tr>
    <tr>
    	<td  align="right" nowrap="nowrap" width="40%">
        	<b>商品名称:</b>
        </td>
        <td align="left" width="60%">
        	{{GoodsName}}
        </td>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>商品代码:</b>
        </td>
        <td  align="left" width="60%">
        	{{GoodsCode}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>商品规格:</b>
        </td>
        <td align="left"  width="60%">
        	{{GoodsSpec}}
        </td>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>零售单价:</b>
        </td>
        <td align="left"  width="60%">
        	¥{{Price}}
        </td>
    </tr>
    
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>会员价:</b>
        </td>
        <td align="left"  width="60%">
        	¥{{VipPrice}}
        </td>
    </tr>
    <tr><td colspan=4><div style="overflow:hidden;background:gray;height:1px;"></div></td></tr>
	{{/each}}
</table>



</script>



<script id="showtype_2" type="text/x-handlebars-template">

 <table class="tab">
{{#each GoodsItemsList}}
 
 <tr>
    	<td  align="right" nowrap="nowrap" width="40%">
        	<b>部门代码:</b>
        </td>
        <td align="left" width="60%">
        	{{DeptId}}
        </td>
    
    	<td  align="right" nowrap="nowrap" width="40%">
        	<b>部门名称:</b>
        </td>
        <td align="left" width="60%">
        	{{DeptName}}
        </td>
    </tr>
    
    <tr>
    	<td  align="right" nowrap="nowrap" width="40%">
        	<b>商品名称:</b>
        </td>
        <td align="left" width="60%">
        	{{GoodsName}}
        </td>
    
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>商品代码:</b>
        </td>
        <td  align="left" width="60%">
        	{{GoodsCode}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>商品规格:</b>
        </td>
        <td align="left"  width="60%">
        	{{GoodsSpec}}
        </td>
    
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>供应商代码:</b>
        </td>
        <td align="left"  width="60%">
        	{{Wldw}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>供应商名称:</b>
        </td>
        <td align="left"  width="60%">
        	{{WldwName}}
        </td>
    
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>进货单价:</b>
        </td>
        <td align="left"  width="60%">
        	¥{{Jhdj}}
        </td>
    </tr>
    
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>结存数量:</b>
        </td>
        <td align="left"  width="60%">
        	{{Jcsl}}
        </td>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>结存金额:</b>
        </td>
        <td align="left"  width="60%">
        	¥{{Jcje}}
        </td>
    </tr>
        <tr><td colspan=4><div style="overflow:hidden;background:gray;height:1px;"></div></td></tr>
	{{/each}}
    
    
</table>

</script>

<script type="text/javascript">
	   var source="";
       var showtype=window.android.showtype();
       var context="";
       if ('1'==showtype){
	      source=$("#showtype_1").html();
	      // context={"GoodsItemsList":[{"DeptId":"0102010705","DeptName":"茜子","GoodsCode":"018704","GoodsName":"茜子太阳伞","GoodsSpec":null,"Price":0,"VipPrice":0,"Wldw":null,"WldwName":null,"Jhdj":0,"Jcsl":0,"Jcje":0}],"Result":"1","Message":""};
	   }
	   if ('2'==showtype){
	      source=$("#showtype_2").html();
	       //context={"GoodsItemsList":[{"DeptId":"0102010705","DeptName":"茜子","GoodsCode":"018704","GoodsName":"茜子太阳伞","GoodsSpec":null,"Price":0,"VipPrice":0,"Wldw":"109041","WldwName":"茜子/吴展新","Jhdj":0,"Jcsl":0,"Jcje":0}],"Result":"1","Message":""};
	   }
       
       var template = Handlebars.compile(source);
	   eval( ' context=' + window.android.getjson() );
	   //var context ={"GoodsCode":"539390","GoodsName":"帮登小童鞋","GoodsSpec":"572B04","PriceList":[{"ShopName":"北苑店","Price":1000},{"ShopName":"天通苑店","Price":1300}],"Result":"1","Message":""}; 
	   
	   window.android.hidepdg();
	  
	   if (context.Result==0){
	   
		   	alert( context.Message );
	   }
	   else{
		   var html = template( context );
   	       $("#main_content").html( html );
	   }
       </script>

</body>
</html>
